/*
 * @Author: szx
 * @Date: 2022-03-04 13:41:55
 * @LastEditTime: 2022-03-04 13:43:13
 * @Description:
 * @FilePath: \leetcode\2100-2199\2108\2108.js
 */
/**
 * @param {string[]} words
 * @return {string}
 */
var firstPalindrome = function (words) {
    for (let i of words) {
        if (isPalindrome(i)) return i;
    }
    return ""
};
function isPalindrome(word) {
    let i = 0,
        j = word.length - 1;
    while (i < j) {
        if (word[i++] != word[j--]) return false;
    }
    return true;
}
